<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../lib/vue.js"></script>
</head>
<body>
    <div id="app">
        <h2>{{title}}</h2>
        <hr>
        <head-one></head-one>
        <parent></parent>
    </div>

    <template id="parent">
        <div>
            <h2 ref='one'>父组件-parent</h2>
            <p>
                <input type="text" v-model='word' name="" id="">
            </p>
        </div>
    </template>


    <script>



        // 根实例 根组件
      const vm = new Vue({
        data:{
          title:"Vue 组件 父改子   ",
          word:'wh2110-daydayup'
        },
        mounted(){
          document.getElementsByTagName("title")[0].innerHTML = this.title;
        }
      }).$mount("#app")
    </script>
</body>
</html>